import VueRouter from 'vue-router';
import Vue from 'vue'

//引入组件
import Home from '../components/tabbars/home.vue'
import Member from '../components/tabbars/member.vue'
import Search from '../components/tabbars/search.vue'
import Shopcar from '../components/tabbars/shopcar.vue'
import NewList from '../components/newbars/newlist.vue'
import newInfo from '../components/newbars/newsinfo.vue'
import photoList from '../components/photo/photolist.vue'
import photoInfo from '../components/photo/photoinfo.vue'
import goodsList from '../components/goods/goodslist.vue'
import goodsInfo from '../components/goods/goodsinfo.vue'
import goodsDesc from '../components/goods/goodsdesc.vue'
import goodsComment from '../components/goods/goodscomment.vue'
Vue.use(VueRouter)
var router=new VueRouter({
    routes:[
        {path:'/',redirect:'/home'},
        {path:'/home',component:Home},
        {path:'/member',component:Member},
        {path:'/search',component:Search},
        {path:'/shopcar',component:Shopcar},
        {path:'/home/newlist',component:NewList},
        {path:'/home/newinfo/:id',component:newInfo},
        {path:'/home/photolist',component:photoList},
        {path:'/home/photoinfo/:id',component:photoInfo},
        {path:'/home/goodslist',component:goodsList},
        {path:'/home/goodsinfo/:id',component:goodsInfo,name:'goodsinfo'},
        {path:'/home/goodsdesc/:id',component:goodsDesc},
        {path:'/home/goodscomment/:id',component:goodsComment}
    ],
    linkActiveClass:'mui-active'
})
export default router